<template>
    <div>
        <span>这里是父组件</span>
        <hr>
        <Child :age="num" @fn="handleFn"></Child>
    </div>
</template>

<script lang='ts' setup>
import Child from "./Child.vue";
import { ref } from "vue"
    let num = ref(20);

    const handleFn = (val:any)=>{
        console.log(val);
        
        num.value++
    }

    const fn = ()=>{

    }
</script>
 
<style lang = "less" scoped>
    
</style>